define(function(require, exports, module) {
	return {
		operateRemind:function(title,text){
			if(!text)
				return;
			
			$.gritter.add({
				title: title||'',
				text: text,
				sticky: false,
				time: '800',
				class_name: 'gritter-info gritter-center gritter-light' 
			});
		},
		operateFailed:function(title,text){
			$.gritter.add({
				title: title||'',
				text: text||'操作失败',
				sticky: false,
				time: '1000',
				class_name: 'gritter-error gritter-light' 
			});
		},
		operateSuccess:function(title,text){
			$.gritter.add({
				title: title||'',
				sticky: false,
				time: '1000',
				text: text||'操作成功',
				class_name: 'gritter-info gritter-light'
			});
		},
		defaultConfig:{
			validate:{
				errorElement: 'div',
				errorClass: 'help-block',
				highlight: function (e) {
					$(e).closest('.form-group').removeClass('has-info').addClass('has-error');
				},
				success: function (e) {
					$(e).closest('.form-group').removeClass('has-error').addClass('has-info');
					$(e).remove();
				},
				errorPlacement: function (error, element) {
					error.insertAfter(element.parent());
				}
			}
		}
	};
});